package com.heima.search;

import com.heima.domain.Student;

import java.util.ArrayList;

public class SearchStudent {
    public void searchStudent(ArrayList<Student> list) {
        if (list.size() == 0) {
            System.out.println("无信息, 请添加后重新查询");
            return;
        }
        System.out.println("学号\t\t姓名\t\t年龄\t\t生日\t\t");
        for (int i = 0; i < list.size(); i++) {
            Student stu = list.get(i);
            System.out.println(stu.getId() + "\t\t" + stu.getName() + "\t\t" + stu.getAge() + "\t\t\t" + stu.getBirthday());
        }
    }
}
